home *** CD-ROM | disk | FTP | other *** search
Wrap
44999 ' Merge this in with the bad copy of SKELETON.BAS 45000 REM ************************************************************ 45001 REM *** Search and List Function Process: Look for records matching 45002 REM *** any specified parameters 45003 REM *** and display them 45004 REM ************************************************************ 45010 LOCATE 25,1:PRINT STRING$(79,32);:LOCATE 25,1:A$="Enter record # to start search or <ENTER> to start at current record ":PRINT A$; 45020 ROW=25:COLUMN=LEN(A$)+2:A1%=LEN(STR$(MAXSIZE)):AX$="0123456789":GOSUB 40130:RECNUM=VAL(AN$) 45030 IF RECNUM<>0 GOTO 45050 ELSE IF CURRENT=-1 THEN RECNUM=1:GOTO 45060 45040 RECNUM=CURRENT:GOTO 45060 45050 IF RECNUM>MAXSIZE THEN RECNUM=1 45060 LOCATE 25,1:PRINT STRING$(79,32);:LOCATE 25,1:A$="Do you wish to display records that have been deleted (Y/N)? ":PRINT A$; 45070 ROW=25:COLUMN=LEN(A$)+2:AX$="YyNn":A1%=1:GOSUB 40130:IF AN$="" GOTO 45060 45080 DEL$=AN$ 45090 LOCATE 25,1:PRINT STRING$(79,32);:LOCATE 25,1:A$="Do you wish to select by a field's contents (Y/N)? ":PRINT A$; 45100 ROW=25:COLUMN=LEN(A$)+2:AX$="YyNn":A1%=1:GOSUB 40130:IF AN$="" GOTO 45090 45110 TEST$=AN$:IF TEST$="N" OR TEST$="n" GOTO 45200 ELSE LOCATE 25,1:PRINT STRING$(79,32); 45120 LOCATE 25,1:A$="Enter field number to test ":PRINT A$;:ROW=25:COLUMN=LEN(A$)+2:AX$="0123456789":A1%=LEN(STR$(NF)):GOSUB 40130:IF AN$="" GOTO 45120 ELSE FL=VAL(AN$):PAGE=0:GOSUB 2000 45130 LOCATE 25,1:PRINT STRING$(79,32);:A$="Enter test string":LOCATE 25,1:PRINT A$;:ROW=25:COLUMN=LEN(A$)+2:AX$=AQ$:A1%=35:GOSUB 40130:IF AN$="" GOTO 45130 45140 COMPARE$=RIGHT$(AN$,LEN(AN$)-1):TYPE$=LEFT$(AN$,1):IF TYPE$<>"<" AND TYPE$<>">" AND TYPE$<>"=" GOTO 45130 45200 GOSUB 32000:IF STAT$="E" GOTO 45300 45210 IF STAT$<>"D" GOTO 45220 45215 IF DEL$="N" OR DEL$="n" GOTO 45300 45220 IF TEST$="Y" OR TEST$="y" GOTO 45400 45230 GOSUB 17000:PAGE=1:FL=0:GOSUB 2000:GOSUB 7000:LOCATE 25,1:PRINT STRING$(79,32);:IF STAT$="A" THEN S$="Active" ELSE S$="Deleted" 45240 A$="Status: "+S$+": Continue search (Y/N)":LOCATE 25,1:PRINT A$;:ROW=25:COLUMN=LEN(A$)+2:A1%=1:AX$="YyNn":GOSUB 40130:IF AN$="Y" OR AN$="y" GOTO 45300 45250 IF AN$="" GOTO 45240 ELSE IF STAT$="D" GOTO 38000 45260 CURRENT=RECNUM:GOTO 37000 45300 RECNUM=RECNUM+1:IF RECNUM>MAXSIZE THEN CURRENT=-1:RETURN 45310 GOTO 45200 45400 GOSUB 17000:IF TYPE$<>"<" GOTO 45500 45410 IF LEFT$(F$(FL),LEN(COMPARE$))=COMPARE$ GOTO 45230 45420 GOTO 45300 45500 IF TYPE$<>">" GOTO 45600 45510 FOR A=1 TO LEN(F$(FL))-LEN(COMPARE$) 45520 IF MID$(F$(FL),A,LEN(COMPARE$))=COMPARE$ GOTO 45230 45530 NEXT A:GOTO 45300 45600 IF F$(FL)=COMPARE$ GOTO 45230 45610 GOTO 45300 46000 REM ************************************************************ 46001 REM *** X-tend Work To New Disk Function Process: Prompt for new 46002 REM *** data disk mount, then 46003 REM *** read in MAXSIZE from 46004 REM *** .DEF file and return 46005 REM *** to caller 46006 REM ************************************************************ 46010 CURRENT=-1:LOCATE 25,1:PRINT STRING$(79,32);:A$="Mount data disk in drive "+LEFT$(NA$,1)+", then press <C> to continue":LOCATE 25,1:PRINT A$; 46020 ROW=25:COLUMN=LEN(A$)+2:AX$="Cc":A1%=1:GOSUB 40130:IF AN$="" GOTO 46010 46030 IN=2:OPEN "I",#2,NA$+".DEF":INPUT#2,MAXSIZE,GOOD:CLOSE:OPEN "i",1,NA$+".vol":INPUT#1,V$:CLOSE:OPEN "r",1,NA$+".DAT",SIZE:IN=0:RETURN 46100 IN=0:LOCATE 25,1:PRINT STRING$(79,32);:GOSUB 47000:GOTO 46000 47000 REM ************************************************************ 47001 REM *** Initialize New Data Disk Function Process: Write records to data 47002 REM *** disk until error 47003 REM *** occurs. Error 47004 REM *** routine will then 47005 REM *** branch back to line 47006 REM *** 47500 where ".DEF" 47007 REM *** file is written. 47008 REM ************************************************************ 47010 CLOSE:CURRENT=-1:IN=1:LOCATE 25,1:PRINT STRING$(79,32);:A$="S)pecify number of records, or U)se all available disk space? ":LOCATE 25,1:PRINT A$; 47020 ROW=25:COLUMN=LEN(A$)+2:AX$="SsUu":A1%=1:GOSUB 40130:IF AN$="" GOTO 47020 47030 IF AN$="U" OR AN$="u" GOTO 47100 ELSE LOCATE 25,1:PRINT STRING$(79,32);:A$="How many data records?":LOCATE 25,1:PRINT A$; 47040 ROW=25:COLUMN=LEN(A$)+2:AX$="0123456789":A1%=6:GOSUB 40130:NU=VAL(AN$):IF AN$="" OR NU=0 GOTO 47030 47050 GOTO 47110 47060 LOCATE 25,1:PRINT STRING$(79,32);:LOCATE 25,1:A$="Enter volume name:":PRINT A$;:ROW=25:COLUMN=LEN(A$)+2:AX$=AQ$:A1%=25:GOSUB 40130:V$=AN$:IF AN$="" GOTO 47060 47070 OPEN "o",1,NA$+".VOL":PRINT#1,V$:CLOSE:RETURN 47100 NU=-1 47110 GOSUB 47060:OPEN "o",2,NA$+".DEF":PRINT#2,100000!,100000!:CLOSE 47120 OPEN "R",#1,NA$+".DAT",SIZE 47125 STAT1$="E":FOR Z=1 TO NF:F$(Z)=STRING$(80,32):NEXT Z:GOSUB 12000 47140 CT=1 47150 LOCATE 25,1:PRINT STRING$(79,32); 47160 A$="Stand by... Initializing record #":LOCATE 25,1:PRINT A$; 47200 LOCATE 25,LEN(A$)+1:PRINT CT;:PUT 1,CT 47210 CT=CT+1:IF NU=-1 GOTO 47200 ELSE NU=NU-1 47220 IF NU=0 GOTO 47500 ELSE GOTO 47200 47500 CLOSE:CT=CT-1:OPEN "O",#2,NA$+".DEF":PRINT#2,CT,0:CLOSE #2 47510 IN=0:LOCATE 25,1:PRINT STRING$(79,32);:RETURN 49000 REM ************************************************************ 49001 REM *** BASIC Error Handler Process: This is really only set 49002 REM *** up to handle the DISK 49003 REM *** SPACE full error when 49004 REM *** initializing a new data 49005 REM *** disk indicated by variable 49006 REM *** IN = 1. Otherwise ERROR 49007 REM *** code is reported, files are 49008 REM *** closed, and program ends. 49009 REM ************************************************************ 49010 IF IN=0 GOTO 49100 49020 IF IN=1 AND ERR=61 THEN RESUME 47500 49030 IF IN=2 AND ERR=53 THEN RESUME 46100 49100 CLS:RESET:PRINT "Internal ERROR #";ERR;" in line #";ERL:PRINT"Consult BASIC manual appendix A for explanation.":END 50000 REM ************************************************************ 50001 REM *** Program Title Display Function Process: Used to display 50002 REM *** program title and 50003 REM *** Display idea credit to: author at beginning 50004 REM *** John Vandergrift and end of program 50005 REM *** execution. 50006 REM ************************************************************ 50010 BEEP:CLS:A$=TI$:A1$="B":A2$="Y":A3$=AU$:C=10 50020 GOSUB 50060 50030 A$=STRING$(LEN(A$)," "):A1$=" ":A2$=" ":A3$=STRING$(LEN(A3$)," "):C=9 50040 GOSUB 50060 50050 FOR Z=1 TO 2000:NEXT Z:RETURN 50060 FOR I=1 TO C 50070 LOCATE I,40-LEN(A$)/2:PRINT A$; 50080 LOCATE 12,4*I:PRINT A1$; 50090 LOCATE 12,81-(4*I):PRINT A2$; 50100 LOCATE 24-I,41-(LEN(A3$)/2):PRINT A3$; 50110 NEXT I 50120 RETURN 60000 REM *** Do not remove lines 60000 through 60009! 60001 REM *** This program SKELETON.BAS is to be used with the Ultra-Mind 60002 REM *** intelligent database program generator. It is copyright, (C), 60003 REM *** 1983, by The FreeSoft Company, P.O. Box 27608, St. Louis, MO 60004 REM *** 63146. For copies of this and the other Ultra-Utility programs, 60005 REM *** send 2 double sided or 4 single sided diskettes and a postage 60006 REM *** paid self addressed return mailer to the address above. Specify 60007 REM *** that you want LIBRARIES #1 and #2. The Ultra-Utilities include 60008 REM *** Ultra-Zap, Ultra-Format, Ultra-File, Ultra-Optimize, and 60009 REM *** Ultra-Mind. Lines 60000 through 60009 all be removed from all 60010 REM *** programs generated by Ultra-Mind.